package mi.payment.utils;

import java.security.MessageDigest;

public class ShaUtil {

    public static byte[] sha_1(byte[] data) throws Exception {
        MessageDigest digest = MessageDigest.getInstance("SHA-1");
        digest.update(data);
        return digest.digest();
    }

    public static byte[] sha_256(byte[] data) throws Exception {
        MessageDigest digest = MessageDigest.getInstance("SHA-256");
        digest.update(data);
        return digest.digest();
    }


}
